home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
red_cross_eru.swf
/
scripts
/
__Packages
/
gamebase
/
road
/
Road.as
< prev
next >
Wrap
Text File
|
2011-09-19
|
14KB
|
385 lines
§§push(true);
§§push(false);
§§push(false);
§§push(true);
while(true)
{
if(§§pop())
{
}
if(§§pop())
{
}
if(§§pop())
{
break;
}
§§push(true);
§§push(false);
}
if(!e.f)
{
e.f = new g();
}
§§pop();
if(!e.f.h)
{
e.f.h = new g();
}
§§pop();
if(!e.f.h[§§constant(4)])
{
f.h[§§constant(4)] extends f[§§constant(6)];
var _loc2_ = f.h[§§constant(4)] = function()
{
super();
_global.h = this;
this[§§constant(5)]();
}[§§constant(7)];
_loc2_[§§constant(5)] = function()
{
this[§§constant(8)] = new §\§\§constant(9)§();
this[§§constant(10)] = new §\§\§constant(9)§();
var _loc4_ = _global[§§constant(11)][§§constant(12)];
this[§§constant(13)] = _loc4_[§§constant(13)][§§constant(14)]();
var _loc5_ = _loc4_[§§constant(8)][§§constant(15)];
var _loc3_ = 0;
while(_loc3_ < _loc5_)
{
this[§§constant(8)][§§constant(17)](new f.h[§§constant(16)](_loc4_[§§constant(8)][_loc3_]));
_loc3_ = _loc3_ + 1;
}
_global[§§constant(19)][§§constant(20)](0,§§constant(18));
this[§§constant(21)] = 0;
this[§§constant(22)]();
};
_loc2_[§§constant(22)] = function()
{
this[§§constant(10)][§§constant(17)](new f.h[§§constant(23)](_global[§§constant(11)][§§constant(12)][§§constant(10)][this[§§constant(21)]]));
};
_loc2_[§§constant(24)] = function()
{
var _loc3_ = _global[§§constant(11)][§§constant(12)][§§constant(10)][§§constant(15)] - 1;
var _loc4_ = eval(§§constant(25))[§§constant(26)](25 * this[§§constant(21)] / _loc3_);
_global[§§constant(19)][§§constant(20)](_loc4_,§§constant(18));
if(this[§§constant(21)] == _loc3_)
{
f[§§constant(28)][§§constant(29)][§§constant(30)](_global[§§constant(12)],_global[§§constant(12)][§§constant(27)],10);
}
else
{
this[§§constant(21)] = this[§§constant(21)] + 1;
f[§§constant(28)][§§constant(29)][§§constant(30)](this,this[§§constant(22)],10);
}
};
_loc2_[§§constant(31)] = function(cid)
{
var _loc3_ = this[§§constant(8)][§§constant(15)];
var _loc2_ = 0;
while(_loc2_ < _loc3_)
{
if(this[§§constant(8)][_loc2_][§§constant(32)] == cid)
{
return this[§§constant(8)][_loc2_];
}
_loc2_ = _loc2_ + 1;
}
};
_loc2_[§§constant(33)] = function(sid)
{
var _loc3_ = this[§§constant(10)][§§constant(15)];
var _loc2_ = 0;
while(_loc2_ < _loc3_)
{
if(this[§§constant(10)][_loc2_][§§constant(32)] == sid)
{
return this[§§constant(10)][_loc2_];
}
_loc2_ = _loc2_ + 1;
}
};
_loc2_[§§constant(34)] = function(car, pstart, pend, checkVehicles)
{
var _loc6_ = new §\§\§constant(9)§();
var _loc14_ = undefined;
var _loc11_ = this[§§constant(35)](pstart,pend,checkVehicles,car);
if(_loc11_[§§constant(36)])
{
if(f[§§constant(37)][§§constant(38)][§§constant(39)](car,_loc11_))
{
_loc11_[§§constant(40)] = car[§§constant(41)];
return _loc11_;
}
}
var _loc13_ = f.h[§§constant(42)][§§constant(43)](pstart,car);
var _loc12_ = f.h[§§constant(42)][§§constant(43)](pend,car);
var _loc5_ = this[§§constant(44)](_loc13_,_loc12_,checkVehicles,car);
var _loc8_ = _loc5_[§§constant(15)];
var _loc2_ = 0;
while(_loc2_ < _loc8_)
{
var _loc4_ = _loc5_[_loc2_];
var _loc3_ = f.h[§§constant(42)][§§constant(45)](_loc4_[§§constant(36)],pstart,pend);
_loc6_[§§constant(17)](_loc3_);
_loc2_ = _loc2_ + 1;
}
_loc14_ = this[§§constant(46)](car,_loc6_);
return _loc14_;
};
_loc2_[§§constant(46)] = function(car, paths)
{
paths[§§constant(48)](§§constant(15),eval(§§constant(9))[§§constant(47)]);
var _loc3_ = undefined;
var _loc5_ = paths[§§constant(15)];
var _loc2_ = 0;
while(_loc2_ < _loc5_)
{
var _loc1_ = paths[_loc2_];
if(!(_loc3_ != undefined && _loc1_[§§constant(15)] == _loc3_))
{
_loc3_ = _loc1_[§§constant(15)];
if(f[§§constant(37)][§§constant(38)][§§constant(39)](car,_loc1_))
{
_loc1_[§§constant(40)] = car[§§constant(41)];
return _loc1_;
}
}
_loc2_ = _loc2_ + 1;
}
return null;
};
_loc2_[§§constant(44)] = function(p1, p2, checkVehicles, sourceCar)
{
var _loc5_ = new §\§\§constant(9)§();
if(p1 == undefined || p2 == undefined)
{
return undefined;
}
if(p1 instanceof f.h[§§constant(16)])
{
var _loc3_ = p1[§§constant(50)](p2,new §\§\§constant(9)§(),{§\§\§constant(49)§:sourceCar});
if(_loc3_)
{
_loc5_[§§constant(17)](_loc3_);
}
}
else
{
var _loc2_ = this[§§constant(33)](p1[§§constant(51)]);
var _loc7_ = this[§§constant(33)](p2[§§constant(51)]);
var _loc8_ = true;
if(_loc2_ == _loc7_)
{
_loc3_ = _loc2_[§§constant(52)](p1,p2);
if(f[§§constant(37)][§§constant(38)][§§constant(39)](sourceCar,_loc3_))
{
_loc5_[§§constant(17)](_loc3_);
_loc8_ = false;
}
}
_loc3_ = _loc2_[§§constant(56)][§§constant(50)](p2,new §\§\§constant(9)§(),{§\§\§constant(49)§:sourceCar,§\§\§constant(53)§:_loc2_,§\§\§constant(54)§:p1,§\§\§constant(55)§:_loc2_[§§constant(56)]});
if(_loc3_)
{
_loc5_[§§constant(17)]({§\§\§constant(36)§:_loc3_[§§constant(36)]});
}
if(_loc2_[§§constant(57)])
{
_loc3_ = _loc2_[§§constant(57)][§§constant(50)](p2,new §\§\§constant(9)§(),{§\§\§constant(49)§:sourceCar,§\§\§constant(53)§:_loc2_,§\§\§constant(54)§:p1,§\§\§constant(55)§:_loc2_[§§constant(57)]});
if(_loc3_)
{
_loc5_[§§constant(17)]({§\§\§constant(36)§:_loc3_[§§constant(36)]});
}
}
}
return _loc5_;
};
_loc2_[§§constant(58)] = function(path, clr)
{
var _loc6_ = path[§§constant(36)][§§constant(15)];
var _loc4_ = 0;
while(_loc4_ < _loc6_)
{
var _loc2_ = path[§§constant(36)][_loc4_];
if(clr == undefined)
{
clr = _loc2_[§§constant(59)];
if(_loc2_[§§constant(59)] == undefined)
{
clr = 16777215;
}
}
var _loc3_ = !(_loc2_ instanceof f.h[§§constant(16)]) ? 6 : 8;
f[§§constant(28)][§§constant(63)][§§constant(64)](_global[§§constant(12)][§§constant(62)],_loc2_[§§constant(61)] - _loc3_ / 2,_loc2_[§§constant(60)] - _loc3_ / 2,_loc3_,_loc3_,clr);
_loc4_ = _loc4_ + 1;
}
};
_loc2_[§§constant(35)] = function(p1, p2, checkVehicles, car)
{
var _loc4_ = false;
var _loc5_ = 0;
var _loc6_ = undefined;
var _loc7_ = f.h[§§constant(42)][§§constant(65)](p1,p2,15,30);
var _loc8_ = _loc7_[§§constant(15)];
var _loc3_ = 0;
while(_loc3_ < _loc8_)
{
var _loc2_ = _loc7_[_loc3_];
if(_loc2_[§§constant(59)] == _global[§§constant(12)][§§constant(66)] || _loc2_[§§constant(59)] == _global[§§constant(12)][§§constant(67)])
{
if(!_loc4_)
{
_loc5_ = _loc5_ + 1;
}
_loc4_ = true;
}
else
{
_loc4_ = false;
}
if(_loc2_[§§constant(59)] == _global[§§constant(12)][§§constant(68)])
{
_loc6_ = true;
break;
}
_loc3_ = _loc3_ + 1;
}
if(_loc6_ && _loc5_ == 0)
{
return null;
}
if(!_loc6_ && _loc5_ < 2)
{
var _loc9_ = {§\§\§constant(61)§:p2[§§constant(61)],§\§\§constant(60)§:p2[§§constant(60)],§\§\§constant(51)§:p2[§§constant(51)]};
_loc9_[§§constant(69)] = _global[§§constant(12)][§§constant(70)](_loc9_[§§constant(61)],_loc9_[§§constant(60)]);
f.h[§§constant(42)][§§constant(71)](_loc9_);
return {§\§\§constant(36)§:[p2],§\§\§constant(15)§:f.h[§§constant(42)][§§constant(72)]([p1,p2])};
}
return null;
};
_loc2_[§§constant(73)] = function(obj, arr)
{
var _loc2_ = arr[§§constant(15)];
var _loc1_ = 0;
while(_loc1_ < _loc2_)
{
if(arr[_loc1_] == obj)
{
return true;
}
_loc1_ = _loc1_ + 1;
}
return false;
};
_loc2_[§§constant(74)] = function()
{
if(this[§§constant(75)] == undefined)
{
this[§§constant(75)] = 0;
}
var _loc3_ = _global[§§constant(76)][§§constant(77) + _global[§§constant(76)][§§constant(78)][this[§§constant(75)]]];
_loc3_[§§constant(79)]();
};
_loc2_[§§constant(80)] = function()
{
var _loc3_ = _global[§§constant(76)][§§constant(78)][§§constant(15)] - 1;
var _loc4_ = 75 + eval(§§constant(25))[§§constant(26)](25 * this[§§constant(75)] / _loc3_);
var _loc5_ = _loc4_ <= 80 ? §§constant(81) : §§constant(82);
_global[§§constant(19)][§§constant(20)](_loc4_,_loc5_);
if(this[§§constant(75)] == _loc3_)
{
f[§§constant(28)][§§constant(29)][§§constant(30)](_global[§§constant(83)],_global[§§constant(83)][§§constant(84)],200);
}
else
{
this[§§constant(75)] = this[§§constant(75)] + 1;
f[§§constant(28)][§§constant(29)][§§constant(30)](this,this[§§constant(74)],10);
}
};
_loc2_[§§constant(85)] = function(x, y)
{
var _loc5_ = undefined;
var _loc2_ = 100000;
var _loc4_ = _global[§§constant(76)][§§constant(86)][§§constant(15)];
var _loc3_ = 0;
while(_loc3_ < _loc4_)
{
var _loc9_ = _global[§§constant(76)][§§constant(77) + _global[§§constant(76)][§§constant(86)][_loc3_]];
var _loc7_ = f[§§constant(28)][§§constant(87)][§§constant(88)](x,y,_loc9_[§§constant(61)],_loc9_[§§constant(60)]);
if(_loc7_ < _loc2_)
{
_loc5_ = _loc9_;
_loc2_ = _loc7_;
}
_loc3_ = _loc3_ + 1;
}
_loc4_ = _global[§§constant(76)][§§constant(89)][§§constant(15)];
_loc3_ = 0;
while(_loc3_ < _loc4_)
{
_loc9_ = _global[§§constant(76)][§§constant(77) + _global[§§constant(76)][§§constant(89)][_loc3_]];
_loc7_ = f[§§constant(28)][§§constant(87)][§§constant(88)](x,y,_loc9_[§§constant(61)],_loc9_[§§constant(60)]);
if(_loc7_ < _loc2_)
{
_loc5_ = _loc9_;
_loc2_ = _loc7_;
}
_loc3_ = _loc3_ + 1;
}
_loc4_ = _global[§§constant(76)][§§constant(90)][§§constant(15)];
_loc3_ = 0;
while(_loc3_ < _loc4_)
{
_loc9_ = _global[§§constant(76)][§§constant(77) + _global[§§constant(76)][§§constant(90)][_loc3_]];
_loc7_ = f[§§constant(28)][§§constant(87)][§§constant(88)](x,y,_loc9_[§§constant(61)],_loc9_[§§constant(60)]);
if(_loc7_ < _loc2_)
{
_loc5_ = _loc9_;
_loc2_ = _loc7_;
}
_loc3_ = _loc3_ + 1;
}
_loc4_ = _global[§§constant(76)][§§constant(91)][§§constant(15)];
_loc3_ = 0;
while(_loc3_ < _loc4_)
{
_loc9_ = _global[§§constant(76)][§§constant(77) + _global[§§constant(76)][§§constant(91)][_loc3_]];
_loc7_ = f[§§constant(28)][§§constant(87)][§§constant(88)](x,y,_loc9_[§§constant(61)],_loc9_[§§constant(60)]);
if(_loc7_ < _loc2_)
{
_loc5_ = _loc9_;
_loc2_ = _loc7_;
}
_loc3_ = _loc3_ + 1;
}
return {§\§\§constant(92)§:_loc5_,§\§\§constant(93)§:_loc5_[§§constant(94)]};
};
_loc2_[§§constant(95)] = function(x, y, ang)
{
var _loc2_ = new f.h[§§constant(96)](true);
var _loc4_ = x + this[§§constant(98)](ang * this[§§constant(97)] / 180) * 28;
var _loc3_ = y - this[§§constant(99)](ang * this[§§constant(97)] / 180) * 28;
_loc2_[§§constant(103)]({§\§\§constant(61)§:_loc4_,§\§\§constant(60)§:_loc3_,§\§\§constant(100)§:§§constant(101),§\§\§constant(102)§:30});
_loc2_[§§constant(79)]();
return _loc2_;
};
_loc2_[§§constant(104)] = function()
{
var _loc3_ = this[§§constant(10)][§§constant(15)];
var _loc2_ = 0;
while(_loc2_ < _loc3_)
{
this[§§constant(10)][_loc2_][§§constant(105)]();
_loc2_ = _loc2_ + 1;
}
_loc3_ = this[§§constant(8)][§§constant(15)];
_loc2_ = 0;
while(_loc2_ < _loc3_)
{
this[§§constant(8)][_loc2_][§§constant(106)]();
_loc2_ = _loc2_ + 1;
}
};
§§push(§§constant(107)(f.h[§§constant(4)][§§constant(7)],null,1));
}
§§pop();